<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.1.1">
  <link rel="apple-touch-icon" sizes="180x180" href="/hexo/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/hexo/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/hexo/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/hexo/images/logo.svg" color="#222">

<link rel="stylesheet" href="/hexo/css/main.css">


<link rel="stylesheet" href="/hexo/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"youchen12138.gitee.io","root":"/hexo/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta property="og:type" content="website">
<meta property="og:title" content="幽辰的博客">
<meta property="og:url" content="https://youchen12138.gitee.io/hexo/page/11/index.html">
<meta property="og:site_name" content="幽辰的博客">
<meta property="og:locale" content="en_US">
<meta property="article:author" content="幽辰">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="https://youchen12138.gitee.io/hexo/page/11/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : true,
    isPost : false,
    lang   : 'en'
  };
</script>

  <title>幽辰的博客</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="Toggle navigation bar">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/hexo/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">幽辰的博客</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/hexo/" rel="section"><i class="fa fa-home fa-fw"></i>Home</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/hexo/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>Tags<span class="badge">23</span></a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/hexo/categories/" rel="section"><i class="fa fa-th fa-fw"></i>Categories<span class="badge">14</span></a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/hexo/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>Archives<span class="badge">127</span></a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content index posts-expand">
            
      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="en">
    <link itemprop="mainEntityOfPage" href="https://youchen12138.gitee.io/hexo/2020/08/26/CSS%E8%BF%9B%E9%98%B6%E7%9F%A5%E8%AF%86%E7%82%B9-3D%E8%BD%AC%E6%8D%A2%E5%8F%8Aperspective%E5%B1%9E%E6%80%A7/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/hexo/images/avatar.jpg">
      <meta itemprop="name" content="幽辰">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="幽辰的博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/hexo/2020/08/26/CSS%E8%BF%9B%E9%98%B6%E7%9F%A5%E8%AF%86%E7%82%B9-3D%E8%BD%AC%E6%8D%A2%E5%8F%8Aperspective%E5%B1%9E%E6%80%A7/" class="post-title-link" itemprop="url">CSS进阶知识点--3D转换及perspective属性</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>
              

              <time title="Created: 2020-08-26 14:20:27 / Modified: 14:21:24" itemprop="dateCreated datePublished" datetime="2020-08-26T14:20:27+08:00">2020-08-26</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">In</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/hexo/categories/CSS/" itemprop="url" rel="index"><span itemprop="name">CSS</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <h1 id="3D转换"><a href="#3D转换" class="headerlink" title="3D转换"></a>3D转换</h1><ul>
<li><p>rotate3d()</p>
</li>
<li><p>translate3d()</p>
</li>
<li><p>scale3d()</p>
</li>
<li><p>perspective</p>
</li>
</ul>
<h2 id="旋转-rotateX-rotateY-rotateZ"><a href="#旋转-rotateX-rotateY-rotateZ" class="headerlink" title="旋转 rotateX/ rotateY / rotateZ"></a>旋转 rotateX/ rotateY / rotateZ</h2><p>指定对象围绕着 X / Y / Z 轴上的旋转角度</p>
<h3 id="语法"><a href="#语法" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>transform：rotateX / rotateY / rotateZ( angle )</p>
</blockquote>
<h2 id="旋转-rotate3d"><a href="#旋转-rotate3d" class="headerlink" title="旋转 rotate3d"></a>旋转 rotate3d</h2><p>指定对象的 3D 旋转角度</p>
<h3 id="语法-1"><a href="#语法-1" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>transform：rotate3d(x, y, z, angle)</p>
</blockquote>
<h3 id="取值说明"><a href="#取值说明" class="headerlink" title="取值说明"></a>取值说明</h3><p>前三个参数分别代表旋转的方向 x，y，z，第四个参数表示旋转的角度，参数不允许省略</p>
<p>前三个参数只有三个取值效果：正数，0，负数</p>
<p>如果多个方向发生改变，小数会代表在这个方向的旋转程度，最小小数取值为 0.1</p>
<h2 id="移动-translateY"><a href="#移动-translateY" class="headerlink" title="移动 translateY"></a>移动 translateY</h2><p>指定对象 Z 轴的平移（更多用于遮罩）</p>
<h3 id="语法-2"><a href="#语法-2" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>transform：translateZ(z)</p>
</blockquote>
<h3 id="数值说明"><a href="#数值说明" class="headerlink" title="数值说明"></a>数值说明</h3><p>z 值不能省略</p>
<h2 id="移动-translate3d"><a href="#移动-translate3d" class="headerlink" title="移动 translate3d"></a>移动 translate3d</h2><p>指定对象的 3D 位移</p>
<h3 id="语法-3"><a href="#语法-3" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>transform：translate3d(x, y, z)</p>
</blockquote>
<h3 id="数值说明-1"><a href="#数值说明-1" class="headerlink" title="数值说明"></a>数值说明</h3><p>第一个参数对应 X 轴，第二个对应 Y 轴，第三个对应 Z 轴，参数不允许省略</p>
<h2 id="缩放-scaleZ"><a href="#缩放-scaleZ" class="headerlink" title="缩放 scaleZ"></a>缩放 scaleZ</h2><p>指定对象的 Z 轴缩放</p>
<h3 id="语法-4"><a href="#语法-4" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>transform: scaleZ(z)</p>
</blockquote>
<h3 id="参数说明"><a href="#参数说明" class="headerlink" title="参数说明"></a>参数说明</h3><p>参数对应 Z 轴，不允许省略</p>
<h2 id="缩放-scale3d"><a href="#缩放-scale3d" class="headerlink" title="缩放 scale3d"></a>缩放 scale3d</h2><p>指定对象的 3D 缩放</p>
<h3 id="语法-5"><a href="#语法-5" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>transform: scale3d(x，y，z)</p>
</blockquote>
<h3 id="参数说明-1"><a href="#参数说明-1" class="headerlink" title="参数说明"></a>参数说明</h3><p>参数不允许省略</p>
<h2 id="perspective-属性"><a href="#perspective-属性" class="headerlink" title="perspective 属性"></a>perspective 属性</h2><p>指定观察者与 XOY 平面（也就是屏幕）的距离，使具有三维位置变换的元素产生透视效果</p>
<h3 id="语法-6"><a href="#语法-6" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>perspective：number | none( 默认值 )</p>
</blockquote>
<h3 id="perspective-origin-属性"><a href="#perspective-origin-属性" class="headerlink" title="perspective-origin 属性"></a>perspective-origin 属性</h3><p>指定透视点的位置</p>
<h4 id="语法-7"><a href="#语法-7" class="headerlink" title="语法"></a>语法</h4><blockquote>
<p>perspective-origin: x-axis y-axis</p>
</blockquote>
<h4 id="默认值"><a href="#默认值" class="headerlink" title="默认值"></a>默认值</h4><p>x-axis：50%</p>
<p>y-axis：50%</p>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="en">
    <link itemprop="mainEntityOfPage" href="https://youchen12138.gitee.io/hexo/2020/08/26/CSS%E8%BF%9B%E9%98%B6%E7%9F%A5%E8%AF%86%E7%82%B9-CSS3%E8%BE%B9%E6%A1%86%E5%92%8C%E5%9C%86%E8%A7%92%EF%BC%88%E6%B5%8F%E8%A7%88%E5%99%A8%E5%89%8D%E7%BC%80%EF%BC%89%E3%80%81%E7%9B%92%E6%A8%A1%E5%9E%8B/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/hexo/images/avatar.jpg">
      <meta itemprop="name" content="幽辰">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="幽辰的博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/hexo/2020/08/26/CSS%E8%BF%9B%E9%98%B6%E7%9F%A5%E8%AF%86%E7%82%B9-CSS3%E8%BE%B9%E6%A1%86%E5%92%8C%E5%9C%86%E8%A7%92%EF%BC%88%E6%B5%8F%E8%A7%88%E5%99%A8%E5%89%8D%E7%BC%80%EF%BC%89%E3%80%81%E7%9B%92%E6%A8%A1%E5%9E%8B/" class="post-title-link" itemprop="url">CSS进阶知识点--CSS3边框和圆角（浏览器前缀）、盒模型</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>
              

              <time title="Created: 2020-08-26 14:18:48 / Modified: 14:19:38" itemprop="dateCreated datePublished" datetime="2020-08-26T14:18:48+08:00">2020-08-26</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">In</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/hexo/categories/CSS/" itemprop="url" rel="index"><span itemprop="name">CSS</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <h1 id="CSS3圆角"><a href="#CSS3圆角" class="headerlink" title="CSS3圆角"></a>CSS3圆角</h1><h2 id="border-radius-属性"><a href="#border-radius-属性" class="headerlink" title="border-radius 属性"></a>border-radius 属性</h2><p>一个最多可指定四个 border-*-radius 属性的复合属性，这个属性允许你为元素添加圆角边框！</p>
<h2 id="语法"><a href="#语法" class="headerlink" title="语法"></a>语法</h2><blockquote>
<p>border-radius: 1-4 length|% / 1-4 length|%</p>
</blockquote>
<h2 id="CSS3指定每个圆角"><a href="#CSS3指定每个圆角" class="headerlink" title="CSS3指定每个圆角"></a>CSS3指定每个圆角</h2><h3 id="多值"><a href="#多值" class="headerlink" title="多值"></a>多值</h3><p>四个值：第一个值为左上角，第二个值为右上角，第三个值为右下角，第四个值为左下角</p>
<p>三个值：第一个值为左上角，第二个值为右上角和左下角，第三个值为右下角</p>
<p>两个值：第一个值为左上角与右下角，第二个值为右上角与左下角</p>
<p>一个值：四个角相同</p>
<h3 id="属性"><a href="#属性" class="headerlink" title="属性"></a>属性</h3><table>
<thead>
<tr>
<th>属性</th>
<th>位置</th>
</tr>
</thead>
<tbody><tr>
<td>border-top-left-radius</td>
<td>定义左上角的弧度</td>
</tr>
<tr>
<td>border-top-right-radius</td>
<td>定义右上角的弧度</td>
</tr>
<tr>
<td>border-bottom-right-radius</td>
<td>定义右下角的弧度</td>
</tr>
<tr>
<td>border-bottom-left-radius</td>
<td>定义左下角的弧度</td>
</tr>
</tbody></table>
<h1 id="CSS3-盒阴影"><a href="#CSS3-盒阴影" class="headerlink" title="CSS3 盒阴影"></a>CSS3 盒阴影</h1><h2 id="box-shadow-属性"><a href="#box-shadow-属性" class="headerlink" title="box-shadow 属性"></a>box-shadow 属性</h2><p>box-shadow 属性可以设置一个或多个下拉阴影的框</p>
<h2 id="语法-1"><a href="#语法-1" class="headerlink" title="语法"></a>语法</h2><blockquote>
<p>box-shadow：h-shadow v-shadow blur spread inset</p>
</blockquote>
<h2 id="属性值"><a href="#属性值" class="headerlink" title="属性值"></a>属性值</h2><ul>
<li><p>h-shadow(水平阴影的位置。允许负值。必写)</p>
</li>
<li><p>v-shadow(垂直阴影的位置。允许负值。必写)</p>
</li>
<li><p>blur(模糊距离。可选)</p>
</li>
<li><p>spread(阴影的尺寸。可选)</p>
</li>
<li><p>color(阴影的颜色。请参阅 CSS 颜色值)</p>
</li>
<li><p>inset(可选。将外部阴影 (outset) 改为内部阴影)</p>
</li>
</ul>
<h1 id="CSS3-边界图片"><a href="#CSS3-边界图片" class="headerlink" title="CSS3 边界图片"></a>CSS3 边界图片</h1><h2 id="border-image-属性"><a href="#border-image-属性" class="headerlink" title="border-image 属性"></a>border-image 属性</h2><p>使用 border-image-* 属性来构建美丽的可扩展按钮</p>
<h2 id="语法-2"><a href="#语法-2" class="headerlink" title="语法"></a>语法</h2><blockquote>
<p>border-image：source slice width outset repeat</p>
</blockquote>
<h2 id="属性值-1"><a href="#属性值-1" class="headerlink" title="属性值"></a>属性值</h2><ul>
<li><p>source：路径</p>
</li>
<li><p>slice：指定图像的边界向内偏移（建议用百分比）</p>
</li>
<li><p>width：图像边界的宽度（建议用百分比）</p>
</li>
<li><p>outset：指定在边框外部绘制 border-image-area 的量</p>
</li>
<li><p>repeat：图像边框是否重复(repeated)、拉伸(strectched)或铺满(rounded)</p>
<ol>
<li><p>strectch</p>
</li>
<li><p>repeat</p>
</li>
<li><p>round</p>
</li>
<li><p>initial</p>
</li>
<li><p>inherit</p>
</li>
</ol>
</li>
</ul>
<h1 id="浏览器前缀"><a href="#浏览器前缀" class="headerlink" title="浏览器前缀"></a>浏览器前缀</h1><table>
<thead>
<tr>
<th>浏览器前缀</th>
<th>浏览器</th>
</tr>
</thead>
<tbody><tr>
<td>-webkit-</td>
<td>谷歌</td>
</tr>
<tr>
<td>-moz-</td>
<td>火狐</td>
</tr>
<tr>
<td>-ms-</td>
<td>IE</td>
</tr>
<tr>
<td>-o-</td>
<td>opera</td>
</tr>
</tbody></table>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="en">
    <link itemprop="mainEntityOfPage" href="https://youchen12138.gitee.io/hexo/2020/08/26/CSS%E8%BF%9B%E9%98%B6%E7%9F%A5%E8%AF%86%E7%82%B9-CSS3%E5%9F%BA%E6%9C%AC%E9%80%89%E6%8B%A9%E5%99%A8%E5%8F%8A%E5%B1%9E%E6%80%A7%E9%80%89%E6%8B%A9%E5%99%A8/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/hexo/images/avatar.jpg">
      <meta itemprop="name" content="幽辰">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="幽辰的博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/hexo/2020/08/26/CSS%E8%BF%9B%E9%98%B6%E7%9F%A5%E8%AF%86%E7%82%B9-CSS3%E5%9F%BA%E6%9C%AC%E9%80%89%E6%8B%A9%E5%99%A8%E5%8F%8A%E5%B1%9E%E6%80%A7%E9%80%89%E6%8B%A9%E5%99%A8/" class="post-title-link" itemprop="url">CSS进阶知识点--CSS3基本选择器及属性选择器</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>
              

              <time title="Created: 2020-08-26 14:17:22 / Modified: 14:17:37" itemprop="dateCreated datePublished" datetime="2020-08-26T14:17:22+08:00">2020-08-26</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">In</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/hexo/categories/CSS/" itemprop="url" rel="index"><span itemprop="name">CSS</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <h1 id="基本选择器"><a href="#基本选择器" class="headerlink" title="基本选择器"></a>基本选择器</h1><ul>
<li><p>通配符选择器</p>
</li>
<li><p>元素选择器</p>
</li>
<li><p>类选择器</p>
</li>
<li><p>ID选择器</p>
</li>
<li><p>后代选择器</p>
</li>
<li><p>子元素选择器</p>
</li>
<li><p>相邻兄弟选择器</p>
</li>
<li><p>通用兄弟选择器</p>
</li>
<li><p>群组选择器</p>
</li>
</ul>
<p>前五个请参考<a target="_blank" rel="noopener" href="https://youchen12138.github.io/2019/07/31/CSS%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86%E7%82%B9-%E9%80%89%E6%8B%A9%E5%99%A8/">CSS基础知识点–选择器</a></p>
<h2 id="子元素选择器"><a href="#子元素选择器" class="headerlink" title="子元素选择器"></a>子元素选择器</h2><h3 id="概念"><a href="#概念" class="headerlink" title="概念"></a>概念</h3><p>子元素选择器只能选择某元素的子元素</p>
<h3 id="语法格式"><a href="#语法格式" class="headerlink" title="语法格式"></a>语法格式</h3><blockquote>
<p>父元素 &gt; 子元素（father &gt; child）</p>
</blockquote>
<h2 id="相邻兄弟选择器"><a href="#相邻兄弟选择器" class="headerlink" title="相邻兄弟选择器"></a>相邻兄弟选择器</h2><h3 id="概念-1"><a href="#概念-1" class="headerlink" title="概念"></a>概念</h3><p>相邻兄弟选择器可以选择紧接在另一元素后的元素，而且他们具有一个相同的父元素</p>
<h3 id="语法格式-1"><a href="#语法格式-1" class="headerlink" title="语法格式"></a>语法格式</h3><blockquote>
<p>元素 + 兄弟相邻元素（Element + Sibling）</p>
</blockquote>
<h2 id="通用兄弟选择器"><a href="#通用兄弟选择器" class="headerlink" title="通用兄弟选择器"></a>通用兄弟选择器</h2><h3 id="概念-2"><a href="#概念-2" class="headerlink" title="概念"></a>概念</h3><p>选择某元素后面的所有兄弟元素，而且他们具有一个相同的父元素</p>
<h3 id="语法格式-2"><a href="#语法格式-2" class="headerlink" title="语法格式"></a>语法格式</h3><blockquote>
<p>元素 ~ 后面所有兄弟相邻元素（Element ~ Sibling）</p>
</blockquote>
<h2 id="群组选择器"><a href="#群组选择器" class="headerlink" title="群组选择器"></a>群组选择器</h2><h3 id="概念-3"><a href="#概念-3" class="headerlink" title="概念"></a>概念</h3><p>群组选择器是将具有相同样式的元素分组在一起，每个选择器之间使用逗号”,”隔开</p>
<h3 id="语法格式-3"><a href="#语法格式-3" class="headerlink" title="语法格式"></a>语法格式</h3><p>元素1，元素2，…，元素n（Element1,Element2,…,Element3）</p>
<h1 id="属性选择器"><a href="#属性选择器" class="headerlink" title="属性选择器"></a>属性选择器</h1><p>对带有制定属性的 HTML 元素设置样式</p>
<p>使用CSS3属性选择器，你可以只指定元素的某个属性，或者你还可以同时指定元素的某个属性和其对应的属性值</p>
<h2 id="Element-attribute"><a href="#Element-attribute" class="headerlink" title="Element[attribute]"></a>Element[attribute]</h2><h3 id="概念-4"><a href="#概念-4" class="headerlink" title="概念"></a>概念</h3><p>选择所有带有 attribute 属性元素</p>
<h2 id="Element-attribute-”value”"><a href="#Element-attribute-”value”" class="headerlink" title="Element[attribute~=”value”]"></a>Element[attribute~=”value”]</h2><h3 id="概念-5"><a href="#概念-5" class="headerlink" title="概念"></a>概念</h3><p>选择 attribute 属性有单词”value”的所有元素（属性不止一个属性值，其中一个属性值为”value”）</p>
<p>注意：该属性选择器用于选取属性值中包含指定词汇的元素，只要是指定的属性，并且属性值列表中包含value，而不是在某个值中以value开头或结尾</p>
<h2 id="Element-attribute-”value”-1"><a href="#Element-attribute-”value”-1" class="headerlink" title="Element[attribute^=”value”]"></a>Element[attribute^=”value”]</h2><h3 id="概念-6"><a href="#概念-6" class="headerlink" title="概念"></a>概念</h3><p>选择 attribute 属性值以”value”开头的所有元素</p>
<p>注意：该属性选择器匹配指定属性的指定value值开头的元素，如果class中有多个value值，第一个值中的第一个字母不是指定的值，即使后面的属性中首字母是指定的值，那么也不能匹配上</p>
<h2 id="Element-attribute-”value”-2"><a href="#Element-attribute-”value”-2" class="headerlink" title="Element[attribute$=”value”]"></a>Element[attribute$=”value”]</h2><h3 id="概念-7"><a href="#概念-7" class="headerlink" title="概念"></a>概念</h3><p>选择 attribute 属性值以”value”结尾的所有元素</p>
<h2 id="Element-attribute-”value”-3"><a href="#Element-attribute-”value”-3" class="headerlink" title="Element[attribute*=”value”]"></a>Element[attribute*=”value”]</h2><h3 id="概念-8"><a href="#概念-8" class="headerlink" title="概念"></a>概念</h3><p>选择 attribute 属性值包含”value”的所有元素（属性值中的单词包含）</p>
<h2 id="Element-attribute-”value”-4"><a href="#Element-attribute-”value”-4" class="headerlink" title="Element[attribute|=”value”]"></a>Element[attribute|=”value”]</h2><h3 id="概念-9"><a href="#概念-9" class="headerlink" title="概念"></a>概念</h3><p>选择 attribute 属性值为”value”或以”value”开头的元素</p>
<table>
<thead>
<tr>
<th>属性选择器</th>
<th>作用</th>
</tr>
</thead>
<tbody><tr>
<td>Element[<code>attribute</code>]</td>
<td>选择所有带有 attribute 属性元素</td>
</tr>
<tr>
<td>Element[<code>attribute~=&quot;value&quot;</code>]</td>
<td>选择 attribute 属性有单词”value”的所有元素（属性不止一个属性值，其中一个属性值为”value”）</td>
</tr>
<tr>
<td>Element[<code>attribute^=&quot;value&quot;</code>]</td>
<td>选择 attribute 属性值以”value”开头的所有元素</td>
</tr>
<tr>
<td>Element[<code>attribute$=&quot;value&quot;</code>]</td>
<td>选择 attribute 属性值以”value”结尾的所有元素</td>
</tr>
<tr>
<td>Element[<code>attribute*=&quot;value&quot;</code>]</td>
<td>选择 attribute 属性值包含”value”的所有元素（属性值中的单词包含）</td>
</tr>
<tr>
<td>Element[`attribute</td>
<td>=”value”`]</td>
</tr>
</tbody></table>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="en">
    <link itemprop="mainEntityOfPage" href="https://youchen12138.gitee.io/hexo/2020/08/26/CSS%E8%BF%9B%E9%98%B6%E7%9F%A5%E8%AF%86%E7%82%B9-CSS3%E4%BC%AA%E7%B1%BB%E9%80%89%E6%8B%A9%E5%99%A8%E5%92%8C%E4%BC%AA%E5%85%83%E7%B4%A0/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/hexo/images/avatar.jpg">
      <meta itemprop="name" content="幽辰">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="幽辰的博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/hexo/2020/08/26/CSS%E8%BF%9B%E9%98%B6%E7%9F%A5%E8%AF%86%E7%82%B9-CSS3%E4%BC%AA%E7%B1%BB%E9%80%89%E6%8B%A9%E5%99%A8%E5%92%8C%E4%BC%AA%E5%85%83%E7%B4%A0/" class="post-title-link" itemprop="url">CSS进阶知识点--CSS3伪类选择器和伪元素</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>
              

              <time title="Created: 2020-08-26 14:16:16 / Modified: 14:16:42" itemprop="dateCreated datePublished" datetime="2020-08-26T14:16:16+08:00">2020-08-26</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">In</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/hexo/categories/CSS/" itemprop="url" rel="index"><span itemprop="name">CSS</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <h1 id="伪类选择器"><a href="#伪类选择器" class="headerlink" title="伪类选择器"></a>伪类选择器</h1><ul>
<li><p>动态伪类（锚点伪类、用户行为伪类）</p>
</li>
<li><p>UI元素状态伪类</p>
</li>
<li><p>CSS3结构伪类</p>
</li>
<li><p>否定选择器</p>
</li>
<li><p>伪元素</p>
</li>
</ul>
<h2 id="动态伪类"><a href="#动态伪类" class="headerlink" title="动态伪类"></a>动态伪类</h2><p>这些伪类并不存在与 HTML 中，只有当用户和网站<strong>交互</strong>的时候才能体现出来</p>
<h3 id="锚点伪类"><a href="#锚点伪类" class="headerlink" title="锚点伪类"></a>锚点伪类</h3><ul>
<li><p>:link</p>
</li>
<li><p>:visited</p>
</li>
</ul>
<h3 id="用户行为伪类"><a href="#用户行为伪类" class="headerlink" title="用户行为伪类"></a>用户行为伪类</h3><ul>
<li><p>:hover</p>
</li>
<li><p>:active</p>
</li>
<li><p>:focus（获取到焦点时的样式）</p>
</li>
</ul>
<h2 id="UI元素状态伪类"><a href="#UI元素状态伪类" class="headerlink" title="UI元素状态伪类"></a>UI元素状态伪类</h2><h3 id="概念"><a href="#概念" class="headerlink" title="概念"></a>概念</h3><p>我们把”<code>:enabled</code>“, “<code>:disabled</code>“, “<code>checked</code>“伪类称为UI元素状态伪类</p>
<h2 id="CSS3结构类"><a href="#CSS3结构类" class="headerlink" title="CSS3结构类"></a>CSS3结构类</h2><h3 id="CSS3的-nth选择器"><a href="#CSS3的-nth选择器" class="headerlink" title="CSS3的:nth选择器"></a>CSS3的<code>:nth</code>选择器</h3><p>我们把CSS3的<code>:nth</code>选择器也称为CSS3结构类</p>
<h3 id="选择方法"><a href="#选择方法" class="headerlink" title="选择方法"></a>选择方法</h3><ul>
<li><p>:first-child</p>
</li>
<li><p>:last-child</p>
</li>
<li><p>:nth-child()</p>
</li>
<li><p>:nth-last-child()</p>
</li>
<li><p>:nth-of-type()</p>
</li>
<li><p>:nth-last-of-type()</p>
</li>
<li><p>:first-of-type</p>
</li>
<li><p>:last-of-type</p>
</li>
<li><p>only-child</p>
</li>
<li><p>only-of-type</p>
</li>
<li><p>:empty</p>
</li>
</ul>
<h3 id="Element-first-child"><a href="#Element-first-child" class="headerlink" title="Element:first-child"></a>Element:first-child</h3><h4 id="概念-1"><a href="#概念-1" class="headerlink" title="概念"></a>概念</h4><p>选择属于其父元素的首个子元素，并为其设置样式</p>
<h3 id="Element-last-child"><a href="#Element-last-child" class="headerlink" title="Element:last-child"></a>Element:last-child</h3><h4 id="概念-2"><a href="#概念-2" class="headerlink" title="概念"></a>概念</h4><p>选择属于其父元素的最后一个子元素，并为其设置样式</p>
<h3 id="Element-nth-child-N"><a href="#Element-nth-child-N" class="headerlink" title="Element:nth-child(N)"></a>Element:nth-child(N)</h3><h4 id="概念-3"><a href="#概念-3" class="headerlink" title="概念"></a>概念</h4><p>选择属于其父元素的第N个子元素，不论元素的类型</p>
<h4 id="关于参数（N）"><a href="#关于参数（N）" class="headerlink" title="关于参数（N）"></a>关于参数（N）</h4><ul>
<li><p>odd 相当于2n+1</p>
</li>
<li><p>even 相当于2n</p>
</li>
</ul>
<h3 id="Element-nth-last-child-N"><a href="#Element-nth-last-child-N" class="headerlink" title="Element:nth-last-child(N)"></a>Element:nth-last-child(N)</h3><h4 id="概念-4"><a href="#概念-4" class="headerlink" title="概念"></a>概念</h4><p>选择属于其父元素的第N个子元素的每个元素，不论元素的类型，从最后一个子元素开始计数</p>
<h3 id="Element-nth-of-type-N"><a href="#Element-nth-of-type-N" class="headerlink" title="Element:nth-of-type(N)"></a>Element:nth-of-type(N)</h3><h4 id="概念-5"><a href="#概念-5" class="headerlink" title="概念"></a>概念</h4><p>选择属于其父元素的特定类型的第N个子元素的每个元素</p>
<h3 id="Element-nth-last-of-type-N"><a href="#Element-nth-last-of-type-N" class="headerlink" title="Element:nth-last-of-type(N)"></a>Element:nth-last-of-type(N)</h3><h4 id="概念-6"><a href="#概念-6" class="headerlink" title="概念"></a>概念</h4><p>选择属于其父元素的特定类型的第N个子元素的每个元素，从最后一个子元素开始计数</p>
<h3 id="Element-first-of-type"><a href="#Element-first-of-type" class="headerlink" title="Element:first-of-type"></a>Element:first-of-type</h3><h4 id="概念-7"><a href="#概念-7" class="headerlink" title="概念"></a>概念</h4><p>选择属于其父元素的特定类型的首个子元素</p>
<h3 id="Element-last-of-type"><a href="#Element-last-of-type" class="headerlink" title="Element:last-of-type"></a>Element:last-of-type</h3><h4 id="概念-8"><a href="#概念-8" class="headerlink" title="概念"></a>概念</h4><p>选择属于其父元素的特定类型的最后一个子元素</p>
<h3 id="Element-only-child"><a href="#Element-only-child" class="headerlink" title="Element:only-child"></a>Element:only-child</h3><h4 id="概念-9"><a href="#概念-9" class="headerlink" title="概念"></a>概念</h4><p>选择属于其父元素的唯一子元素</p>
<h3 id="Element-only-of-type"><a href="#Element-only-of-type" class="headerlink" title="Element:only-of-type"></a>Element:only-of-type</h3><h4 id="概念-10"><a href="#概念-10" class="headerlink" title="概念"></a>概念</h4><p>选择属于其父元素的唯一特定类型的子元素</p>
<h3 id="Element-empty"><a href="#Element-empty" class="headerlink" title="Element:empty"></a>Element:empty</h3><h4 id="概念-11"><a href="#概念-11" class="headerlink" title="概念"></a>概念</h4><p>选择没有子元素（包括文本节点）的每个元素</p>
<h2 id="否定选择器"><a href="#否定选择器" class="headerlink" title="否定选择器"></a>否定选择器</h2><h3 id="概念-12"><a href="#概念-12" class="headerlink" title="概念"></a>概念</h3><p>:not(Element/selector)选择器匹配非指定元素/选择器的每个元素</p>
<h3 id="语法格式"><a href="#语法格式" class="headerlink" title="语法格式"></a>语法格式</h3><blockquote>
<p>父元素:not(子元素/子选择器)</p>
</blockquote>
<h1 id="伪元素"><a href="#伪元素" class="headerlink" title="伪元素"></a>伪元素</h1><p>CSS 伪元素用于向某些选择器设置特殊效果</p>
<h2 id="语法格式-1"><a href="#语法格式-1" class="headerlink" title="语法格式"></a>语法格式</h2><blockquote>
<p>元素::伪元素（Element::pseudo-element）</p>
</blockquote>
<h2 id="Element-first-line"><a href="#Element-first-line" class="headerlink" title="Element::first-line"></a>Element::first-line</h2><h3 id="概念-13"><a href="#概念-13" class="headerlink" title="概念"></a>概念</h3><p>根据”first-line”伪元素中的样式对 Element 元素的第一行文本进行格式化</p>
<h3 id="说明"><a href="#说明" class="headerlink" title="说明"></a>说明</h3><p>“first-line”伪元素只能用于块级元素</p>
<h2 id="Element-first-letter"><a href="#Element-first-letter" class="headerlink" title="Element::first-letter"></a>Element::first-letter</h2><h3 id="概念-14"><a href="#概念-14" class="headerlink" title="概念"></a>概念</h3><p>用于向文本的首字母设置特殊样式</p>
<h3 id="说明-1"><a href="#说明-1" class="headerlink" title="说明"></a>说明</h3><p>“first-letter”伪元素只能用于块级元素</p>
<h2 id="Element-before"><a href="#Element-before" class="headerlink" title="Element::before"></a>Element::before</h2><h3 id="概念-15"><a href="#概念-15" class="headerlink" title="概念"></a>概念</h3><p>在元素的内容前面插入新内容</p>
<h3 id="说明-2"><a href="#说明-2" class="headerlink" title="说明"></a>说明</h3><p>常配合”content”配合使用</p>
<h3 id="特点"><a href="#特点" class="headerlink" title="特点"></a>特点</h3><ol>
<li><p>第一个子元素</p>
</li>
<li><p>行级元素</p>
</li>
<li><p>内容通过 content 写入</p>
</li>
<li><p>标签中找不到对应标签，只能在浏览器开发者工具那可以找到</p>
</li>
</ol>
<h2 id="Element-after"><a href="#Element-after" class="headerlink" title="Element::after"></a>Element::after</h2><h3 id="概念-16"><a href="#概念-16" class="headerlink" title="概念"></a>概念</h3><p>在元素的内容后面插入新内容</p>
<h3 id="说明-3"><a href="#说明-3" class="headerlink" title="说明"></a>说明</h3><p>常配合”content”配合使用，常用于清除浮动</p>
<h2 id="Element-selection"><a href="#Element-selection" class="headerlink" title="Element::selection"></a>Element::selection</h2><h3 id="概念-17"><a href="#概念-17" class="headerlink" title="概念"></a>概念</h3><p>用于设置在浏览器中选中文本后的背景色与前景色</p>
<h3 id="兼容性说明"><a href="#兼容性说明" class="headerlink" title="兼容性说明"></a>兼容性说明</h3><p>::selection 在IE家族中，只有IE9+ 版本支持，在 Firefox 中需要加上其前缀”-moz”</p>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="en">
    <link itemprop="mainEntityOfPage" href="https://youchen12138.gitee.io/hexo/2020/08/26/CSS%E8%BF%9B%E9%98%B6%E7%9F%A5%E8%AF%86%E7%82%B9-Transform%E5%9D%90%E6%A0%87%E7%B3%BB%E7%BB%9F%E4%B8%8ECSS%E7%9F%A9%E9%98%B5%E5%8F%8A%E6%89%A9%E5%B1%95/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/hexo/images/avatar.jpg">
      <meta itemprop="name" content="幽辰">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="幽辰的博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/hexo/2020/08/26/CSS%E8%BF%9B%E9%98%B6%E7%9F%A5%E8%AF%86%E7%82%B9-Transform%E5%9D%90%E6%A0%87%E7%B3%BB%E7%BB%9F%E4%B8%8ECSS%E7%9F%A9%E9%98%B5%E5%8F%8A%E6%89%A9%E5%B1%95/" class="post-title-link" itemprop="url">CSS进阶知识点--Transform坐标系统与CSS矩阵及扩展</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>
              

              <time title="Created: 2020-08-26 14:14:57 / Modified: 14:15:36" itemprop="dateCreated datePublished" datetime="2020-08-26T14:14:57+08:00">2020-08-26</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">In</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/hexo/categories/CSS/" itemprop="url" rel="index"><span itemprop="name">CSS</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <h1 id="Transform-与坐标系统"><a href="#Transform-与坐标系统" class="headerlink" title="Transform 与坐标系统"></a>Transform 与坐标系统</h1><h2 id="transform-origin-属性"><a href="#transform-origin-属性" class="headerlink" title="transform-origin 属性"></a>transform-origin 属性</h2><p>允许你更改转换元素的位置</p>
<h3 id="语法"><a href="#语法" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>transform-origin: x-axis y-axis z-axis</p>
</blockquote>
<h1 id="CSS3-矩阵"><a href="#CSS3-矩阵" class="headerlink" title="CSS3 矩阵"></a>CSS3 矩阵</h1><p>CSS3 中的矩阵指的是一个方法，书写为 matrix() 和 matrix3d()。</p>
<p>matrix 是元素 2D 平面的移动转换（transform），2D 变换矩阵为 3*3。</p>
<p>matrix3d 是元素 3D 的移动变换（transform），3D 变换则是 4*4 的矩阵</p>
<h2 id="矩阵-matrix"><a href="#矩阵-matrix" class="headerlink" title="矩阵 matrix"></a>矩阵 matrix</h2><blockquote>
<p>transform: matrix(a, b, c, d, tx, ty)</p>
</blockquote>
<p>注意书写方向是竖直方向</p>
<h2 id="转换公式"><a href="#转换公式" class="headerlink" title="转换公式"></a>转换公式</h2><p>x，y表示转换元素的所有坐标</p>
<p><img src="https://upload-images.jianshu.io/upload_images/16731485-0e75d52a982dff3e.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="image"></p>
<p><img src="https://upload-images.jianshu.io/upload_images/16731485-ca05339467c90dc4.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="image"></p>
<p><img src="https://upload-images.jianshu.io/upload_images/16731485-3adbce44856aa3af.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="image"></p>
<h3 id="镜像对称公式"><a href="#镜像对称公式" class="headerlink" title="镜像对称公式"></a>镜像对称公式</h3><p><code>matrix((1-k*k) / (1+k*k), 2k / (1 + k*k), 2k / (1 + k*k), (k*k - 1) / (1+k*k), 0, 0)</code></p>
<p>k 代表所要对称的斜率</p>
<h1 id="CSS3-扩展属性"><a href="#CSS3-扩展属性" class="headerlink" title="CSS3 扩展属性"></a>CSS3 扩展属性</h1><h2 id="transform-style-属性"><a href="#transform-style-属性" class="headerlink" title="transform-style 属性"></a>transform-style 属性</h2><p>指定嵌套元素是怎样在三维空间中呈现</p>
<blockquote>
<p>transform-style：flat(默认值) | preserve-3d</p>
</blockquote>
<h2 id="backface-visibility-属性"><a href="#backface-visibility-属性" class="headerlink" title="backface-visibility 属性"></a>backface-visibility 属性</h2><p>指定元素背面面向用户时是否可见</p>
<h3 id="语法-1"><a href="#语法-1" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>backface-visibility: visible( 默认值 ) | hidden</p>
</blockquote>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="en">
    <link itemprop="mainEntityOfPage" href="https://youchen12138.gitee.io/hexo/2020/08/26/CSS%E8%BF%9B%E9%98%B6%E7%9F%A5%E8%AF%86%E7%82%B9-%E8%83%8C%E6%99%AF/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/hexo/images/avatar.jpg">
      <meta itemprop="name" content="幽辰">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="幽辰的博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/hexo/2020/08/26/CSS%E8%BF%9B%E9%98%B6%E7%9F%A5%E8%AF%86%E7%82%B9-%E8%83%8C%E6%99%AF/" class="post-title-link" itemprop="url">CSS进阶知识点--背景</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>
              

              <time title="Created: 2020-08-26 13:27:16 / Modified: 14:14:08" itemprop="dateCreated datePublished" datetime="2020-08-26T13:27:16+08:00">2020-08-26</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">In</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/hexo/categories/CSS/" itemprop="url" rel="index"><span itemprop="name">CSS</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <h1 id="背景图像区域"><a href="#背景图像区域" class="headerlink" title="背景图像区域"></a>背景图像区域</h1><h2 id="background-clip-属性"><a href="#background-clip-属性" class="headerlink" title="background-clip 属性"></a>background-clip 属性</h2><p>指定背景绘制区域</p>
<h3 id="语法"><a href="#语法" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>background-clip：border-box | padding-box | content-box</p>
</blockquote>
<ul>
<li><p>border-box：背景被裁剪到边框盒</p>
</li>
<li><p>padding-box：背景被裁剪到内边距框</p>
</li>
<li><p>content-box：背景被裁剪到内容框</p>
</li>
</ul>
<h2 id="background-origin-属性"><a href="#background-origin-属性" class="headerlink" title="background-origin 属性"></a>background-origin 属性</h2><p>设置元素背景图片的原始起始位置</p>
<h3 id="语法-1"><a href="#语法-1" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>background-origin：padding-box | border-box | content-box</p>
</blockquote>
<h2 id="background-size-属性"><a href="#background-size-属性" class="headerlink" title="background-size 属性"></a>background-size 属性</h2><p>background-size 属性指定背景图片的大小</p>
<h3 id="语法-2"><a href="#语法-2" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>background-size：length | percentage | cover | contain</p>
</blockquote>
<ul>
<li><p>cover：将背景图片等比缩放以填满整个容器</p>
</li>
<li><p>contain：将背景图片等比缩放至某一边紧贴容器边缘为止</p>
</li>
</ul>
<p>注意：</p>
<ol>
<li><p>若只设置第一个值时，第二个值根据图片宽度值来等比缩放</p>
</li>
<li><p>当两个值都有，按设置值大小显示图片</p>
</li>
</ol>
<h2 id="多重背景图像"><a href="#多重背景图像" class="headerlink" title="多重背景图像"></a>多重背景图像</h2><h3 id="概念"><a href="#概念" class="headerlink" title="概念"></a>概念</h3><p>CSS3 允许你为元素使用多个背景图像</p>
<h3 id="语法-3"><a href="#语法-3" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>background-image：url(img1.jpg), url(img2.jpg)</p>
</blockquote>
<h2 id="CSS3-背景属性整合（不建议这样写）"><a href="#CSS3-背景属性整合（不建议这样写）" class="headerlink" title="CSS3 背景属性整合（不建议这样写）"></a>CSS3 背景属性整合（不建议这样写）</h2><p>背景缩写属性可以在一个声明中设置所有的背景属性</p>
<h3 id="语法-4"><a href="#语法-4" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>background：color: color position size repeat origin clip attachment image;</p>
</blockquote>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="en">
    <link itemprop="mainEntityOfPage" href="https://youchen12138.gitee.io/hexo/2020/08/26/CSS%E8%BF%9B%E9%98%B6%E7%9F%A5%E8%AF%86%E7%82%B9-%E6%96%87%E6%9C%AC%E4%B8%8E%E5%AD%97%E4%BD%93%EF%BC%88overflow%E5%8F%8A%E8%8E%B7%E5%8F%96%E7%89%B9%E6%AE%8A%E5%AD%97%E4%BD%93%EF%BC%89/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/hexo/images/avatar.jpg">
      <meta itemprop="name" content="幽辰">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="幽辰的博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/hexo/2020/08/26/CSS%E8%BF%9B%E9%98%B6%E7%9F%A5%E8%AF%86%E7%82%B9-%E6%96%87%E6%9C%AC%E4%B8%8E%E5%AD%97%E4%BD%93%EF%BC%88overflow%E5%8F%8A%E8%8E%B7%E5%8F%96%E7%89%B9%E6%AE%8A%E5%AD%97%E4%BD%93%EF%BC%89/" class="post-title-link" itemprop="url">CSS进阶知识点--文本与字体（overflow及获取特殊字体）</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>
              

              <time title="Created: 2020-08-26 13:02:30 / Modified: 13:02:48" itemprop="dateCreated datePublished" datetime="2020-08-26T13:02:30+08:00">2020-08-26</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">In</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/hexo/categories/CSS/" itemprop="url" rel="index"><span itemprop="name">CSS</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <h1 id="CSS3-文本阴影"><a href="#CSS3-文本阴影" class="headerlink" title="CSS3 文本阴影"></a>CSS3 文本阴影</h1><h2 id="text-shadow-属性"><a href="#text-shadow-属性" class="headerlink" title="text-shadow 属性"></a>text-shadow 属性</h2><p>应用于阴影文本</p>
<h3 id="语法"><a href="#语法" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>text-shadow：h-shadow v-shadow blur color</p>
</blockquote>
<h2 id="text-outline-属性"><a href="#text-outline-属性" class="headerlink" title="text-outline 属性"></a>text-outline 属性</h2><p>规定文本轮廓</p>
<h3 id="语法-1"><a href="#语法-1" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>text-outline：thickness(轮廓粗细) blur color</p>
</blockquote>
<h3 id="兼容性"><a href="#兼容性" class="headerlink" title="兼容性"></a>兼容性</h3><p>任何主流浏览器都不支持 text-outline 属性</p>
<h1 id="CSS3-换行"><a href="#CSS3-换行" class="headerlink" title="CSS3 换行"></a>CSS3 换行</h1><h2 id="word-break-属性"><a href="#word-break-属性" class="headerlink" title="word-break 属性"></a>word-break 属性</h2><p>规定自动换行的处理方法</p>
<h3 id="语法-2"><a href="#语法-2" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>word-break：normal | break-all | keep-all</p>
</blockquote>
<h2 id="word-wrap-属性"><a href="#word-wrap-属性" class="headerlink" title="word-wrap 属性"></a>word-wrap 属性</h2><p>允许长单词或 URL 地址换行到下一行,只针对英文</p>
<h3 id="语法-3"><a href="#语法-3" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>word-wrap：normal | break-word</p>
</blockquote>
<h1 id="CSS3-新文本属性"><a href="#CSS3-新文本属性" class="headerlink" title="CSS3 新文本属性"></a>CSS3 新文本属性</h1><h2 id="text-align-last-属性"><a href="#text-align-last-属性" class="headerlink" title="text-align-last 属性"></a>text-align-last 属性</h2><p>规定如何对齐文本最后一行</p>
<h3 id="语法-4"><a href="#语法-4" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>text-align-last：auto | left | right | center | justify | start | end | initial | inherit</p>
</blockquote>
<h3 id="兼容性-1"><a href="#兼容性-1" class="headerlink" title="兼容性"></a>兼容性</h3><p>只有 IE 支持，火狐浏览器要加上前缀</p>
<h3 id="注意"><a href="#注意" class="headerlink" title="注意"></a>注意</h3><p>text-align-last 属性只有在 text-align 属性设置为 “justify” 时才起作用</p>
<h2 id="text-overflow-属性"><a href="#text-overflow-属性" class="headerlink" title="text-overflow 属性"></a>text-overflow 属性</h2><p>规定当文本溢出包含元素时发生的事情</p>
<h3 id="语法-5"><a href="#语法-5" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>text-overflow：clip | ellipsis | string</p>
</blockquote>
<h3 id="注意-1"><a href="#注意-1" class="headerlink" title="注意"></a>注意</h3><ol>
<li><p>在写 text-overflow 时，一定要在前面写上 <code>overflow：hidden</code></p>
</li>
<li><p>string 属性值只有在火狐浏览器中兼容</p>
</li>
</ol>
<h1 id="font-face"><a href="#font-face" class="headerlink" title="@font-face"></a>@font-face</h1><h2 id="语法规则"><a href="#语法规则" class="headerlink" title="语法规则"></a>语法规则</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">@font-face&#123;</span><br><span class="line">    font-family: &lt;YourWebFontName&gt;;              &#x2F;&#x2F;字体名称，必填</span><br><span class="line">    src: &lt;source&gt;[&lt;format&gt;][&lt;source&gt;[&lt;format&gt;]]*;&#x2F;&#x2F;字体存放路径，可多个，必填</span><br><span class="line">    [font-weight: &lt;weight&gt;];                     &#x2F;&#x2F;字体粗细，选填</span><br><span class="line">    [font-style: &lt;style&gt;];                       &#x2F;&#x2F;字体样式，选填</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h3 id="取值规则"><a href="#取值规则" class="headerlink" title="取值规则"></a>取值规则</h3><h4 id="YourWebFontName"><a href="#YourWebFontName" class="headerlink" title="YourWebFontName"></a>YourWebFontName</h4><p>自定义的字体名称，他将被引用到 Web 元素中的 font-family</p>
<h4 id="source"><a href="#source" class="headerlink" title="source"></a>source</h4><p>自定义的字体的存放路径，可以是相对路径也可以是绝对路径（建议用相对路径）</p>
<h4 id="format"><a href="#format" class="headerlink" title="format"></a>format</h4><p>自定义字体的格式，主要用来帮助浏览器识别</p>
<h4 id="weight-和-style"><a href="#weight-和-style" class="headerlink" title="weight 和 style"></a>weight 和 style</h4><p>粗体和斜体</p>
<h3 id="字体格式"><a href="#字体格式" class="headerlink" title="字体格式"></a>字体格式</h3><h4 id="TrueType-tff-格式："><a href="#TrueType-tff-格式：" class="headerlink" title="TrueType(.tff)格式："></a>TrueType(.tff)格式：</h4><p>.ttf 字体是 Windows 和 Mac 的最常见的字体，是一种 RAW 格式，因此他不为网站优化</p>
<p>可以用在手机端</p>
<h4 id="OpenType-otf-格式"><a href="#OpenType-otf-格式" class="headerlink" title="OpenType(.otf)格式"></a>OpenType(.otf)格式</h4><p>.otf 字体被认为是一种原始的字体格式，其内置在 TureType 的基础上，所以也提供了更多的功能</p>
<p>可以用于手机端</p>
<h4 id="Web-Open-Font-Format-woff-格式："><a href="#Web-Open-Font-Format-woff-格式：" class="headerlink" title="Web Open Font Format(.woff)格式："></a>Web Open Font Format(.woff)格式：</h4><p>.woff 字体是 Web 字体中最佳格式，他是一个开放的 TrueType / OpenType 的压缩版本，同时也支持元数据包的分离</p>
<p>不能用于手机端</p>
<h4 id="Embedded-Open-Type-eot-格式："><a href="#Embedded-Open-Type-eot-格式：" class="headerlink" title="Embedded Open Type(.eot)格式："></a>Embedded Open Type(.eot)格式：</h4><p>.eot 字体是 IE 专用字体，可以从 TrueType 创建此格式字体</p>
<p>只有 IE 可以兼容</p>
<h4 id="SVG-svg-格式："><a href="#SVG-svg-格式：" class="headerlink" title="SVG(.svg)格式："></a>SVG(.svg)格式：</h4><p>.svg 字体是基于 SVG 字体渲染的一种格式</p>
<h2 id="字体的应用"><a href="#字体的应用" class="headerlink" title="字体的应用"></a>字体的应用</h2><p><img src="https://upload-images.jianshu.io/upload_images/16731485-ffa9a09c2e6900c0.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="image"></p>
<h1 id="overflow-属性"><a href="#overflow-属性" class="headerlink" title="overflow 属性"></a>overflow 属性</h1><ul>
<li><p>visible    默认值。内容不会被修剪，会呈现在元素框之外。</p>
</li>
<li><p>hidden    内容会被修剪，并且其余内容是不可见的。</p>
</li>
<li><p>scroll    内容会被修剪，但是浏览器会显示滚动条以便查看其余的内容。</p>
</li>
<li><p>auto    如果内容被修剪，则浏览器会显示滚动条以便查看其余的内容。</p>
</li>
<li><p>inherit    规定应该从父元素继承 overflow 属性的值。</p>
</li>
</ul>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="en">
    <link itemprop="mainEntityOfPage" href="https://youchen12138.gitee.io/hexo/2020/08/26/CSS%E8%BF%9B%E9%98%B6%E7%9F%A5%E8%AF%86%E7%82%B9-%E6%B8%90%E5%8F%98/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/hexo/images/avatar.jpg">
      <meta itemprop="name" content="幽辰">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="幽辰的博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/hexo/2020/08/26/CSS%E8%BF%9B%E9%98%B6%E7%9F%A5%E8%AF%86%E7%82%B9-%E6%B8%90%E5%8F%98/" class="post-title-link" itemprop="url">CSS进阶知识点--渐变</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>
              

              <time title="Created: 2020-08-26 12:55:30 / Modified: 12:56:24" itemprop="dateCreated datePublished" datetime="2020-08-26T12:55:30+08:00">2020-08-26</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">In</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/hexo/categories/CSS/" itemprop="url" rel="index"><span itemprop="name">CSS</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <p>渐变（gradients）可以在两个或多个指定的颜色之间显示平稳的过渡</p>
<h2 id="线性渐变（linear-gradients）"><a href="#线性渐变（linear-gradients）" class="headerlink" title="线性渐变（linear-gradients）"></a>线性渐变（linear-gradients）</h2><ul>
<li><p>从左到右</p>
</li>
<li><p>从上到下</p>
</li>
<li><p>从下到上</p>
</li>
<li><p>从右到左</p>
</li>
<li><p>可以对角线</p>
</li>
<li><p>使用角度</p>
</li>
</ul>
<p>是沿着一根轴线改变颜色，从起点到终点颜色进行顺序渐变（从一边拉向另一边）</p>
<h3 id="语法"><a href="#语法" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>background：linear-gradient(direction, color-stop1, color-stop2,…);</p>
</blockquote>
<p><strong>默认</strong>方向为从上到下</p>
<p><strong>注意</strong>：渐变方向为从左到右或从右至左甚至于从左上角到右下角时，渐变方向的写法（不用角度），例<strong>从左到右</strong></p>
<ul>
<li><p>Google：开始的方向，left</p>
</li>
<li><p>Firefox：最后的方向，right</p>
</li>
<li><p>opera：最后的方向，right</p>
</li>
<li><p>标准：to 最后的方向，to right</p>
</li>
</ul>
<h3 id="线性渐变–使用角度"><a href="#线性渐变–使用角度" class="headerlink" title="线性渐变–使用角度"></a>线性渐变–使用角度</h3><h4 id="语法-1"><a href="#语法-1" class="headerlink" title="语法"></a>语法</h4><blockquote>
<p>background：linear-gradients(angle, color-stop1, color-stop2,…);</p>
</blockquote>
<h4 id="角度说明"><a href="#角度说明" class="headerlink" title="角度说明"></a>角度说明</h4><p>0deg 将创建一个从下到上的渐变，90deg 将创建一个从左到右的渐变，随着度数增加顺时针旋转</p>
<p>只写 Google 浏览器的渐变时，webkit 内核下，0deg 将创建一个从左往右的建斌啊，90deg 将创建一个从下到上的渐变，随着角度增加逆时针旋转（一般不用在意）</p>
<h4 id="颜色节点"><a href="#颜色节点" class="headerlink" title="颜色节点"></a>颜色节点</h4><blockquote>
<p>background：linear-gradient(direction, color-stop1 | percentage, color-stop2 | percentage,…);</p>
</blockquote>
<h3 id="线性渐变–重复渐变"><a href="#线性渐变–重复渐变" class="headerlink" title="线性渐变–重复渐变"></a>线性渐变–重复渐变</h3><h4 id="语法-2"><a href="#语法-2" class="headerlink" title="语法"></a>语法</h4><blockquote>
<p>background：repeating-linear-gradient(direction, color-stop1 | percentage, color-stop2 | percentage,…);</p>
</blockquote>
<h2 id="径向渐变（radial-gradient）"><a href="#径向渐变（radial-gradient）" class="headerlink" title="径向渐变（radial gradient）"></a>径向渐变（radial gradient）</h2><p>从起点到终点颜色从内到外进行圆形渐变（从中间向外拉）</p>
<h3 id="语法-3"><a href="#语法-3" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>background：radial-gradient(origin, shape size, start-color,…, last-color);</p>
</blockquote>
<p>默认颜色节点均匀分布</p>
<h3 id="径向渐变–颜色节点不均匀分布"><a href="#径向渐变–颜色节点不均匀分布" class="headerlink" title="径向渐变–颜色节点不均匀分布"></a>径向渐变–颜色节点不均匀分布</h3><blockquote>
<p>background：radial-gradient(color-stop1 | percentage, color-stop2 | percentage,…);</p>
</blockquote>
<h3 id="径向渐变–设置形状"><a href="#径向渐变–设置形状" class="headerlink" title="径向渐变–设置形状"></a>径向渐变–设置形状</h3><blockquote>
<p>background：radial-gradient(origin, shape size, start-color,…, last-color);</p>
</blockquote>
<h4 id="形状说明"><a href="#形状说明" class="headerlink" title="形状说明"></a>形状说明</h4><ul>
<li><p>circle —— 圆形</p>
</li>
<li><p>ellipse —— 椭圆（默认）</p>
</li>
</ul>
<p>如果元素宽和高设置一样，则形状为圆形</p>
<h3 id="径向渐变–尺寸大小关键字"><a href="#径向渐变–尺寸大小关键字" class="headerlink" title="径向渐变–尺寸大小关键字"></a>径向渐变–尺寸大小关键字</h3><blockquote>
<p>background：radial-gradient(origin, shape size, start-color,…, last-color);</p>
</blockquote>
<h4 id="关键字说明"><a href="#关键字说明" class="headerlink" title="关键字说明"></a>关键字说明</h4><ul>
<li><p>closest-side：最近边</p>
</li>
<li><p>farthest-side：最远边</p>
</li>
<li><p>closest-corner：最近角</p>
</li>
<li><p>farthest-corner：最远角</p>
</li>
</ul>
<h3 id="origin-属性"><a href="#origin-属性" class="headerlink" title="origin 属性"></a>origin 属性</h3><p>第一个值为水平方向，第二个值为竖直方向，以左上角为原点</p>
<h3 id="径向渐变"><a href="#径向渐变" class="headerlink" title="径向渐变"></a>径向渐变</h3><blockquote>
<p>background：repeating-radial-gradient(color-stop1 percentage, color-stop2 percentage,…);</p>
</blockquote>
<h1 id="其他渐变"><a href="#其他渐变" class="headerlink" title="其他渐变"></a>其他渐变</h1><h2 id="Internet-Explorer-渐变"><a href="#Internet-Explorer-渐变" class="headerlink" title="Internet Explorer 渐变"></a>Internet Explorer 渐变</h2><h3 id="语法-4"><a href="#语法-4" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>filter:progid:DXImageTranform.Microsoft.gradient( startColorstr =’startColor’, endColorstr=’endColor’, GradientType = 0 );</p>
</blockquote>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="en">
    <link itemprop="mainEntityOfPage" href="https://youchen12138.gitee.io/hexo/2020/08/26/git%E6%8B%89%E5%8F%96%E4%BB%93%E5%BA%93%E6%9B%B4%E6%96%B0%E4%BB%A3%E7%A0%81/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/hexo/images/avatar.jpg">
      <meta itemprop="name" content="幽辰">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="幽辰的博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/hexo/2020/08/26/git%E6%8B%89%E5%8F%96%E4%BB%93%E5%BA%93%E6%9B%B4%E6%96%B0%E4%BB%A3%E7%A0%81/" class="post-title-link" itemprop="url">git拉取仓库更新代码</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>
              

              <time title="Created: 2020-08-26 12:32:13 / Modified: 12:43:52" itemprop="dateCreated datePublished" datetime="2020-08-26T12:32:13+08:00">2020-08-26</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">In</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/hexo/categories/Git/" itemprop="url" rel="index"><span itemprop="name">Git</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <h2 id="在仓库代码有更新的情况下拉取更新代码"><a href="#在仓库代码有更新的情况下拉取更新代码" class="headerlink" title="在仓库代码有更新的情况下拉取更新代码"></a>在仓库代码有更新的情况下拉取更新代码</h2><p>首先取决于你是否想要保存本地修改。（<a target="_blank" rel="noopener" href="https://blog.csdn.net/nakiri_arisu/article/details/80259531#yes">是</a> /<a target="_blank" rel="noopener" href="https://blog.csdn.net/nakiri_arisu/article/details/80259531#no">否</a>）</p>
<h3 id="是"><a href="#是" class="headerlink" title="是"></a>是</h3><p>别急我们有如下三部曲</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git stash  &#x2F;&#x2F; 保存工作现场</span><br><span class="line">git pull origin master  &#x2F;&#x2F; 拉取仓库代码</span><br><span class="line">git stash pop</span><br></pre></td></tr></table></figure>

<p><code>git stash</code>的时候会把你本地快照，然后<code>git pull</code> 就不会阻止你了，pull完之后这时你的代码并没有保留你的修改。惊了！ 别急，我们之前好像做了什么？</p>
<h4 id="stash"><a href="#stash" class="headerlink" title="stash"></a>stash</h4><p>这时候执行 <code>git stash pop</code> 可以从git栈中获取到最近一次<strong>stash</strong>进去的内容，恢复工作区的内容，并且会删除栈中对应的stash</p>
<p>这时候你去本地看会发现发生冲突的本地修改还在，这时候你该commit push啥的就悉听尊便了。</p>
<h3 id="否"><a href="#否" class="headerlink" title="否"></a>否</h3><p>既然不想保留本地的修改，那好办。直接将本地的状态恢复到上一个commit id 。然后用远程的代码直接覆盖本地就好了。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git reset --hard </span><br><span class="line">git pull origin master</span><br></pre></td></tr></table></figure>
      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="en">
    <link itemprop="mainEntityOfPage" href="https://youchen12138.gitee.io/hexo/2020/08/26/CSS%E8%BF%9B%E9%98%B6%E7%9F%A5%E8%AF%86%E7%82%B9-%E8%BF%87%E6%B8%A1/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/hexo/images/avatar.jpg">
      <meta itemprop="name" content="幽辰">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="幽辰的博客">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/hexo/2020/08/26/CSS%E8%BF%9B%E9%98%B6%E7%9F%A5%E8%AF%86%E7%82%B9-%E8%BF%87%E6%B8%A1/" class="post-title-link" itemprop="url">CSS进阶知识点--过渡</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>
              

              <time title="Created: 2020-08-26 00:10:01 / Modified: 00:10:21" itemprop="dateCreated datePublished" datetime="2020-08-26T00:10:01+08:00">2020-08-26</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">In</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/hexo/categories/CSS/" itemprop="url" rel="index"><span itemprop="name">CSS</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <h1 id="过渡"><a href="#过渡" class="headerlink" title="过渡"></a>过渡</h1><p>允许 CSS 的属性值在一定的时间区间内平滑地过渡</p>
<p>在鼠标单击、获取焦点、被点击或对元素任何改变中触发，并平滑地以动画效果改变 CSS 的属性值</p>
<h1 id="transition-属性"><a href="#transition-属性" class="headerlink" title="transition 属性"></a>transition 属性</h1><h2 id="transition-property-属性"><a href="#transition-property-属性" class="headerlink" title="transition-property 属性"></a>transition-property 属性</h2><p>检索或设置对象中的参与过渡的属性</p>
<h3 id="语法"><a href="#语法" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>transition-property：none | all | property</p>
</blockquote>
<h3 id="参数说明"><a href="#参数说明" class="headerlink" title="参数说明"></a>参数说明</h3><table>
<thead>
<tr>
<th>参数</th>
<th>作用</th>
</tr>
</thead>
<tbody><tr>
<td>none</td>
<td>没有属性改变</td>
</tr>
<tr>
<td>all</td>
<td>所有属性改变（默认值）</td>
</tr>
<tr>
<td>property</td>
<td>元素属性名</td>
</tr>
</tbody></table>
<h2 id="transition-duration-属性"><a href="#transition-duration-属性" class="headerlink" title="transition-duration 属性"></a>transition-duration 属性</h2><p>检索或设置对象过渡的持续时间</p>
<h3 id="语法-1"><a href="#语法-1" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>transition-duration: time</p>
</blockquote>
<h3 id="参数说明-1"><a href="#参数说明-1" class="headerlink" title="参数说明"></a>参数说明</h3><p>规定完成过渡效果需要花费的时间（以秒或毫秒计）</p>
<p>默认值为 0 </p>
<h2 id="transition-timing-function-属性"><a href="#transition-timing-function-属性" class="headerlink" title="transition-timing-function 属性"></a>transition-timing-function 属性</h2><p>检索或设置对象中过渡的动画类型</p>
<h3 id="语法-2"><a href="#语法-2" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>transition-timing-function: ease | linear | ease-in | ease-out | ease-in-out | step-start | step-end | steps ( <code>&lt;integer&gt;</code>[, [ start | end ] ] ) </p>
</blockquote>
<h3 id="参数说明-2"><a href="#参数说明-2" class="headerlink" title="参数说明"></a>参数说明</h3><table>
<thead>
<tr>
<th>参数</th>
<th>说明</th>
</tr>
</thead>
<tbody><tr>
<td>linear</td>
<td>线性过渡。等同于贝塞尔曲线(0.0，0.0，1.0，1.0)</td>
</tr>
<tr>
<td>ease</td>
<td>平滑过渡。等同于贝塞尔曲线(0.25, 0.1, 0.25, 0.1)</td>
</tr>
<tr>
<td>ease-in</td>
<td>由慢到快。等同于贝塞尔曲线(0.42, 0, 1.0, 1.0)</td>
</tr>
<tr>
<td>ease-out</td>
<td>由快到慢。等同于贝塞尔曲线(0, 0, 0.58, 1.0)</td>
</tr>
<tr>
<td>ease-in-out</td>
<td>由慢到快再到慢。等同于贝塞尔曲线(0.42, 0, 0.58, 1.0)</td>
</tr>
<tr>
<td>step-start</td>
<td>等同于steps(1, start)</td>
</tr>
<tr>
<td>step-end</td>
<td>等同于steps(1, end)</td>
</tr>
<tr>
<td>`steps ( <integer>[, [ start</td>
<td>end ] ] )`</td>
</tr>
<tr>
<td>cubic-bezier(num1, num2, num3, num4)</td>
<td>特定的贝塞尔曲线类型，4个数值需在[0, 1]区间内</td>
</tr>
</tbody></table>
<h2 id="transition-delay-属性"><a href="#transition-delay-属性" class="headerlink" title="transition-delay 属性"></a>transition-delay 属性</h2><p>检索或设置对象延迟过渡的时间</p>
<h3 id="语法-3"><a href="#语法-3" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>transition-delay：time</p>
</blockquote>
<h3 id="参数说明-3"><a href="#参数说明-3" class="headerlink" title="参数说明"></a>参数说明</h3><ul>
<li><p>指定秒或毫秒数之前要等待切换效果开始</p>
</li>
<li><p>默认值为 0 </p>
</li>
</ul>
<h2 id="transition-属性-1"><a href="#transition-属性-1" class="headerlink" title="transition 属性"></a>transition 属性</h2><p>复合属性，检索或设置对象变换时的过渡</p>
<h3 id="语法-4"><a href="#语法-4" class="headerlink" title="语法"></a>语法</h3><blockquote>
<p>transition: property duration timing-function delay</p>
</blockquote>
<p>必须写duration属性值</p>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  


  
  <nav class="pagination">
    <a class="extend prev" rel="prev" href="/hexo/page/10/"><i class="fa fa-angle-left" aria-label="Previous page"></i></a><a class="page-number" href="/hexo/">1</a><span class="space">&hellip;</span><a class="page-number" href="/hexo/page/10/">10</a><span class="page-number current">11</span><a class="page-number" href="/hexo/page/12/">12</a><a class="page-number" href="/hexo/page/13/">13</a><a class="extend next" rel="next" href="/hexo/page/12/"><i class="fa fa-angle-right" aria-label="Next page"></i></a>
  </nav>



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          Table of Contents
        </li>
        <li class="sidebar-nav-overview">
          Overview
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="幽辰"
      src="/hexo/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">幽辰</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/hexo/archives/">
        
          <span class="site-state-item-count">127</span>
          <span class="site-state-item-name">posts</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/hexo/categories/">
          
        <span class="site-state-item-count">14</span>
        <span class="site-state-item-name">categories</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/hexo/tags/">
          
        <span class="site-state-item-count">23</span>
        <span class="site-state-item-name">tags</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">幽辰</span>
</div>
  <div class="powered-by">Powered by <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a>
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/hexo/lib/anime.min.js"></script>
  <script src="/hexo/lib/velocity/velocity.min.js"></script>
  <script src="/hexo/lib/velocity/velocity.ui.min.js"></script>

<script src="/hexo/js/utils.js"></script>

<script src="/hexo/js/motion.js"></script>


<script src="/hexo/js/schemes/pisces.js"></script>


<script src="/hexo/js/next-boot.js"></script>




  















  

  

</body>
</html>
